﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HelfenHelfen.DataAccess.Entities;
using HelfenHelfen.DataAccess.Factories;
using HelfenHelfen.Logic.Interfaces;
using HelfenHelfen.DataAccess.Interfaces;

namespace HelfenHelfen.Logic
{   
    public class OrganisationLogic : IOrganisationLogic
    {
        public void Insert(Organisation newOrganisation)
        {
            // Do some validation, ... here
            IOrganisationDataAccess da = DataAccessFactory.CreateOrganisationDataAccess();
            da.Insert(newOrganisation);
        }

        public void Update(Organisation updateOrganisation)
        {
            // Do some validation, ... here
            IOrganisationDataAccess da = DataAccessFactory.CreateOrganisationDataAccess();
            da.Update(updateOrganisation);
        }

        public void Delete(Guid organisationId)
        {
            // Do some validation, ... here
            IOrganisationDataAccess da = DataAccessFactory.CreateOrganisationDataAccess();
            da.Delete(organisationId);
        }

        public Organisation Get(Guid organisationId)
        {
            // Do some validation, ... here
            IOrganisationDataAccess da = DataAccessFactory.CreateOrganisationDataAccess();
            return da.Get(organisationId);
        }

        public IList<Organisation> GetAll()
        {
            IOrganisationDataAccess da = DataAccessFactory.CreateOrganisationDataAccess();
            return da.GetAll();
        }
    }
}
